


import {observable,action,computed} from "mobx"
import {fromJS,toJS}  from "immutable"
class User{
  @observable userInfo= fromJS({
     username:"x",
     age:19,
     phone:110,
  })
  @action changeUserInfo = (payload)=>{
    // this.userInfo = {...this.userInfo,...payload}
    this.userInfo = fromJS({...this.userInfo.toJS(),...payload})
  }
}

export default new User()